package com.ly;

import com.ly.pojo.Stu;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration //为了说明当前类为配置类，加上这个注解后，会被容器扫描到
public class SpringBootConfig {

    @Bean
    public Stu stu() {
        return new Stu("Jack",18);
    }
}
